package com.xms.organization.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xms.organization.data.OrganizationMapper;
import com.xms.organization.entity.Organization;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author migo
 * @since 2021-08-27
 */
@Service
public class OrganizationService extends ServiceImpl<OrganizationMapper, Organization> implements IOrganizationService {

    @Override
    public Organization getByUniqueName(String name) {
        return this.getOne(new LambdaQueryWrapper<Organization>().eq(Organization::getUniquename, name));
    }
}
